package DTO;

import BLL.BProduct;
import BLL.BUser;

public class Favorite {
	public int getCartId() {
		return cartId;
	}
	public void setCartId(int cartId) {
		this.cartId = cartId;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getProductId() {
		return productId;
	}
	public void setProductId(int productId) {
		this.productId = productId;
	}
	public User getUser() {
            if(user == null)
            {
                user = new BUser().getById(userId);
            }
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Product getProduct() {
            if(product == null)
            {
                product = new BProduct().getById(productId);
            }
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	private  int favoriteId;
	public int getFavoriteId() {
		return favoriteId;
	}
	public void setFavoriteId(int favoriteId) {
		this.favoriteId = favoriteId;
	}
	private int cartId;
    private int userId;
    private int productId;
    private User user;
    private Product product;
}
